﻿@model NGroup.VTL.Models.PagingInfoModel
@{
    Dictionary<int, string> _pageSizeHash = Model.PageSizeList;
}
<table class="table-navigation" cellspacing="10" style="margin: 0 auto;">
    <tbody>
        <tr>
            <td style="width: 404px;">
                <!-- paging buttons -->
                <input @(Model.CurrentPage == 1 ? "disabled" : "") class="btnFirst" direction="first" type="button" value="&lt;&lt;" />
                <input @(Model.CurrentPage == 1 ? "disabled" : "") class="btnPre" direction="previous" type="button" value="&lt;"/>
                <input @(Model.CurrentPage == Model.TotalPages ? "disabled" : "") class="btnNext" direction="next" type="button" value="&gt;" />
                <input @(Model.CurrentPage == Model.TotalPages ? "disabled" : "") class="btnLast" direction="last" type="button" value="&gt;&gt;" />
                <select class="cbxCurPage" name="currentPage">
                    @for (int i = 1; i <= Model.TotalPages; i++)
                    {
                        if (i == Model.CurrentPage)
                        {
                        <option value="@i.ToString()" selected="selected">@i.ToString()</option>    
                        }
                        else
                        {
                        <option value="@i.ToString()">@i.ToString()</option>    
                        }
                    }
                </select>
                @Lang.partial_paging_trongso <span class="totalPages">@Model.TotalPages</span>
                <input type="button" class="btnGo" value="@Lang.partial_paging_nutchuyen" />
            </td>
            <td>
                <span class="show-message">@Lang.partial_paging_hien:</span>
                <!-- PageSize list -->
                <select class="cbxPageSize" name="pageSize">
                    @foreach (var item in _pageSizeHash)
                    {
                        if (item.Key == Model.PageSize)
                        {
                        <option value="@item.Key" selected="selected">@item.Value</option>    
                        }
                        else
                        {
                        <option value="@item.Key">@item.Value</option>    
                        }
                    }
                </select>
            </td>
        </tr>
    </tbody>
</table>
<script type="text/javascript" src="@Url.Content("~/Content/script/vtl.paging.js")"></script>